this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.UI=this.BX.Landing.UI||{};(function(e,t,n){"use strict";var i;var a=function(e){babelHelpers.inherits(n,e);babelHelpers.createClass(n,null,[{key:"makeId",value:function e(){return"landing_ui_panel_".concat(t.Text.getRandom())}},{key:"createLayout",value:function e(n){return t.Tag.render(i||(i=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="landing-ui-panel landing-ui-hide" data-id="','"></div>\n\t\t'])),n)}}]);function n(){var e;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;babelHelpers.classCallCheck(this,n);e=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this));e.setEventNamespace("BX.Landing.UI.Panel.BasePanel");e.id=t.Type.isString(i)?i:n.makeId();e.layout=n.createLayout(e.id);e.classShow="landing-ui-show";e.classHide="landing-ui-hide";e.forms=new BX.Landing.UI.Collection.FormCollection;e.contextDocument=document;e.contextWindow=e.contextDocument.defaultView;return e}babelHelpers.createClass(n,[{key:"show",value:function e(t){if(!this.isShown()){return BX.Landing.Utils.Show(this.layout)}return Promise.resolve()}},{key:"hide",value:function e(){if(this.isShown()){return BX.Landing.Utils.Hide(this.layout)}return Promise.resolve()}},{key:"isShown",value:function e(){return!t.Dom.hasClass(this.layout,this.classHide)}},{key:"setContent",value:function e(n){this.clear();if(t.Type.isString(n)){this.layout.innerHTML=n}else if(t.Type.isDomNode(n)){this.appendContent(n)}else if(t.Type.isArray(n)){n.forEach(this.appendContent,this)}}},{key:"appendContent",value:function e(n){if(t.Type.isDomNode(n)){this.layout.appendChild(n)}}},{key:"prependContent",value:function e(n){if(t.Type.isDomNode(n)){t.Dom.prepend(n,this.layout)}}},{key:"renderTo",value:function e(n){if(t.Type.isDomNode(n)){t.Dom.append(this.layout,n)}}},{key:"remove",value:function e(){t.Dom.remove(this.layout)}},{key:"appendForm",value:function e(t){this.layout.appendChild(t.getNode())}},{key:"clear",value:function e(){t.Dom.clean(this.layout)}},{key:"setLayoutClass",value:function e(n){t.Dom.addClass(this.layout,n)}},{key:"setContextDocument",value:function e(t){this.contextDocument=t;this.contextWindow=this.contextDocument.defaultView}}]);return n}(n.EventEmitter);e.BasePanel=a})(this.BX.Landing.UI.Panel=this.BX.Landing.UI.Panel||{},BX,BX.Event);
//# sourceMappingURL=base.bundle.map.js